﻿using System;

namespace Zinnia.Kernel
{
    /// <summary>
    /// 注入接口约定
    /// </summary>
    public interface IInjectService
    {
    }
    /// <summary>
    /// 依赖注入容器端口
    /// </summary>
    public interface IDependencyInjectHub : IInjectService, IDisposable
    {
        /// <summary>
        /// 初始化端口
        /// </summary>
        /// <param name="isManual">true:读取配置文件  false:反射接口</param>
        void Init(bool isManual = false);
        /// <summary>
        /// 卸载端口
        /// </summary>
        void UnLoad();
        /// <summary>
        /// 获取接口实现类
        /// </summary>
        /// <typeparam name="T">T为接口类型</typeparam>
        /// <returns></returns>
        T Resolve<T>();
    }
}